package com.smartboard.network.game;

import java.util.List;

/**
 * Created by cheas on 2018/8/13.
 */

public interface IPlayGame {
    public static final int STATE_NOT_START = 0;
    public static final int STATE_PLAYING = 1;
    public static final int STATE_OVER = 2;

    public static final int RESULT_NONE = 0;
    public static final int RESULT_WIN_LOST = 1;
    public static final int RESULT_DRAW = 2;

    public int getId();
    public String getName();
    public IRoom getRoom();
    public IUser getOwner();            // owner为该对局创建者
    public IUser getPlayer1();          // player1为先手
    public IUser getPlayer2();          // player2为后手
    public List<IUser> getWatchers();
    public IUser getNextPlayer();
    public boolean isInPlaying(IUser user); // user是否正在对弈本局
    public int getGameState();
    public Object getGameInfo();
    public int getResult();
    public IUser getWinner();           // 只有game状态为over的时候才能获取到获胜者
}
